from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
import time
import logging

logging.basicConfig(level=logging.DEBUG)

# # 初始化浏览器驱动
# driver = webdriver.Chrome(ChromeDriverManager().install())   # 自动解决浏览器依赖
driver = webdriver.Chrome(r"C:\Users\TT\.wdm\drivers\chromedriver\win32\114.0.5735.90\chromedriver.exe")
# driver = webdriver.Chrome()  # 不给浏览器驱动地址时，需要将浏览器驱动配置到环境变量中
# 打开百度首页
driver.get("https://www.baidu.com")
time.sleep(5)
driver.quit()